package com.azusa.ktc_user.config;

import com.azusa.ktc_user.interceptor.JwtInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import utils.JwtUtil;

@Configuration
public class ApplicationConfig extends WebMvcConfigurationSupport {
//    方便测试跨域处理，先注销拦截器
//    @Autowired
//    private JwtInterceptor jwtInterceptor;
//
//    @Override
//    protected void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(jwtInterceptor)
//                .addPathPatterns("/**")
//                .excludePathPatterns("/**/login","/**/sms/*","/**/register");   //放行注册、登录、发送验证码功能
//    }
//
}
